{% load crispy_forms_tags %}
{#{% crispy example_form example_form.helper %}#}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div class="markdownx row">
    <div class="col-md-12">
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" id="myTab" role="tablist">
            <li class="nav-item">
                <a class="nav-link active" id="editor-tab" data-toggle="tab" href="#editor" role="tab" aria-controls="editor"
                   aria-selected="true">编辑</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" id="preview-tab" data-toggle="tab" href="#preview" role="tab" aria-controls="preview"
                   aria-selected="false">预览</a>
            </li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <div class="tab-pane active" id="editor" role="tabpanel" aria-labelledby="editor-tab">
                {% include 'django/forms/widgets/textarea.html' %}
            </div>
            <div class="tab-pane" id="preview" role="tabpanel" aria-labelledby="preview-tab">
                <div class="markdownx-preview mt-3"></div>
            </div>
        </div>
    </div>
</div>
    <form action="" enctype="multipart/form-data" id="article-form" method="post" role="form">
        {% csrf_token %}
        {{ form }}
        <div class="form-group">
            <button type="button" class="btn btn-primary publish">发表</button>
            <button type="button" class="btn btn-default draft">保存草稿</button>
            <a class="btn btn-light" style="float:right" href="">取消</a>
        </div>
    </form>
    {{ form.media }}
</body>
</html>